The Body Element and Related Elements

The BODY element

Within the BODY element, you can structure text into paragraphs, and lists, as well as highlighting phrases and creating links, amongst other things. The BODY element has the following attributes, all of which are optional:

Note that the ID, LANG and CLASS attributes can be used with virtually all of the elements permitted in the document body.

ID
An SGML identifier used as the target for hypertext links or for naming particular elements in associated style sheets. Identifiers are NAME tokens and must be unique for the scope of the current document.
LANG
This is one of the ISO standard language abbreviations, e.g. en_uk for the variation of English spoken in the United Kingdom. It can be used by parsers to select language specific choices for quotation marks, ligatures and hypenation rules etc.
CLASS
This a space separated list of SGML NAME tokens and is used to subclass tag names. For instance, <P CLASS=STANZA.COUPLET> defines a paragraph that acts as a couplet in a stanza. By convention, the class names are interpreted hierarchically, with the most general class on the left and the most specific on the right, where classes are separated by a period. The CLASS attribute is most commonly used to attach a different style to some element, but it is recommended that where practical class names should be picked on the basis of the element's semantics, as this will permit other uses, such as restricting search through documents by matching on element class names. The conventions for choosing class names are outside the scope of this specification.
BACKGROUND
This can be used to specify a URI for an image tile to cover the document background. This provides a way of giving a group of documents a distinctive appearence. Clients may ignore this attribute. It is included here for the benefit of clients that don't support style sheets.

BODY

The body of an HTML document contains all the information which is part of the document, arranged in the order in which it is presented to the reader. Specifically, the body of a document may contain links, text, and formatting information within <BODY> and </BODY> tags.

NOTE: All elements described in this specification, except for HIGHLIGHTING, IMAGES, and FORMS elements, are supported under HTML Level 0. HTML Level 1 adds support for Highlighting and Images elements. All elements, including those related to Forms, are HTML Level 2.

These elements may be included in the body of an HTML document:


ADDRESS

The ADDRESS element specifies such information as address, signature and authorship, often at the top or bottom of a document.

Typically, an address element is italic and may be indented. The ADDRESS element implies a paragraph break.

Example:

<ADDRESS>
Newsletter editor<BR>
J.R. Brown<BR>
JimquickPost News, Jumquick, CT 01234<BR>
Tel (123) 456 7890
</ADDRESS>

Anchor

A section of text which forms the start and/or destination of a hypertext link is called an "anchor" and is defined by the <A> tag.

<A HREF="http://www.hal.com">HaL Computer Systems</A>

The most common attributes of the <ANCHOR> tag are:

HREF
Optional

If the HREF attribute is present, the anchor is sensitive text: the start of a link. If the reader selects this text, (s)he moves to another document whose network address is defined by the value of the HREF attribute.

The format of the network address is specified in the URI specification for print readers. With the HREF attribute, the form HREF="#identifier" can refer to another anchor in the same document. If the anchor is in another document, the attribute may be a relative name (relative to the document's address or the specified base address).

NAME
Optional

If present, the attribute NAME allows the anchor to be the destination of a link. The value of the attribute is an identifier for the anchor.

Identifiers are arbitrary strings but must be unique within the HTML document. Another document can then make a reference explicitly to this anchor by putting the identifier after the address, separated by a hash sign.

TITLE
Optional

The TITLE element is informational only. If present the TITLE attribute should provide the title of the document whose address is given by the HREF attribute. This is useful for at least two reasons:

The browser software may chose to display the title of the document prior to retrieving it, for example as a margin note or on a small box while the mouse is over the anchor, or during document fetch.

Some documents -- mainly those which are not marked up text, such as graphics, plain text and also Gopher menus, do not come with a title themselves, and so putting a title in the link is the only way to give them a title. Obviously it leads to duplication of data, and so it is dangerous to assume that the title attribute of the link is a valid and unique title for the destination document.

REL
An attribute REL may give the relationship(s) described by the hypertext link.
REV
The REV attribute is the same as REL, but the semantics of the link type are in the reverse direction.
URN
Optional

If present, the URN attribute specifies a uniform resource name (URN) for the document. URNs allow a document to be recognized if duplicate copies are found. This prevents a client implementation from picking up a copy of something it already has.

The format of URNs is under discussion (1993) by various working groups of the Internet Engineering Task Force.

METHODS
Optional

The METHODS attributes of anchors and links provide information about the functions which the user may perform on an object. These are more accurately given by the HTTP protocol when it is used, but it may, for similar reasons as for the TITLE attribute, be useful to include the information in advance in the link. For example, the browser may chose a different rendering as a function of the methods allowed (for example something which is searchable may get a different icon).

The value of the METHODS attribute is a comma separated list of HTTP methods supported by the object for public use.

Although all attributes are optional, either NAME or HREF is necessary for the anchor to be useful. Example:

See <A HREF="http://www.hal.com/">HaL</A>'s information for more details.
<A NAME=INDECENT>Indecent</A> dress is defined as dress which the community
finds offensive. The restaurant may refuse service to anyone who is
<A HREF="#INDECENT">indecently</A> dressed.
See also: LINK

BLOCKQUOTE

The BLOCKQUOTE or BQ element allows text quoted from another source to be rendered in a particular way.

A typical rendering might be a slight extra left and right indent, and/or italic font. BQ causes a paragraph break, and typically provides a line or so of white space before and after the quote.

Single-font rendition may reflect the quotation style of Internet mail by putting a vertical line of graphic characters (such as the greater than symbol ">") in the left margin.

Example:

<P>I think it ends

<BQ>
<P>Soft you now, the fair Ophelia. Nymph,
in thy orisons, be all my sins remembered.
</BQ>

<P>but I am not sure.

Headings

HTML defines six heading levels. A heading element implies all the font changes, paragraph breaks before and after, and white space necessary to render the heading. Further character emphasis or paragraph marks are not required in HTML headings.

The heading elements are H1, H2, H3, H4, H5, H6, with H1 being the highest level of heading. For example:

<H1>This is a heading</H1>
Here is some text
<H2>Second level heading</H2>
Here is some more text.

The style of each heading level is up to the designer of the presentation software. Since the rendering software is responsible for generating vertical white space between elements, do not follow a heading element with a paragraph tag.

A typical rendering for headings is:

H1
Bold very large font, centered. One or two lines clear space between this and anything following. If printed on paper, start new page.
H2
Bold, large font, flush left against left margin, no indent. One or two clear lines above and below.
H3
Italic, large font, slightly indented from the left margin. One or two clear lines above and below.
H4
Bold, normal font, indented more than H3. One clear line above and below.
H5
Italic, normal font, indented as H4. One clear line above.
H6
Bold, indented same as normal text, more than H5. One clear line above.

Parsers should not require any specific order to heading elements, even if the heading level increases by more than one between successive headings.

NOTE: Although heading levels can be skipped (for example, from H1 to H3), this practice is discouraged as skipping header levels may produce unpredictable results when generating other representations from HTML.